﻿<html>
<title> Bài 15</title>
<FORM METHOD = POST ACTION="#">	
  <center>		
		  <img src="bn.gif" width =100% height= 20%></a><br>		
     <center><marquee>
   <TABLE BORDER src="http://i324.photobucket.com/albums/k353/tieuthu_huyenthoaitinhyeu/Themes/Divider/stellinecompaiono5wr.gif">
        <TR>
         <TD COLSPAN=3><img src="M.gif" width="500" height="60" 
         ><br>
		 </TD>	  
       </TR>
   </TABLE></marquee>
    </center>
     <align="center" style="margin-left:0px;"><table border="0"
            background="http://1.bp.blogspot.com/-wcExNer-aCU/URzetjfPGzI/AAAAAAAABFo/G_nrS7wV1WQ/s1600/anh-tran-tri-blogger-blogspot_anh-dong-nen-blog_Namkna-blogspot-com_36.gif" 
              align="center" style="border-collapse:collapse;font-size:inherit;width:1360px;margin-left:auto;height:400px;color:blue;font-weight:bold;">
           <td style="margin-left:0px;vertical-align:top;"><p align="center">
 </center>
     <EMBED src="lt.mp3" width="0" height="0" AUTOSTART="false" LOOP="true">
   <center><h1><b><font color="blue">Bài 15 <hr width =30%></font></h1></u>
      <br>
   <b><i><font color= "blue">Nhập vào giá trị:</font></i></b>
   <input  type= "char" name ="a" size="10">
      <br><br>
   <input type="image" src= http://blog.uhm.vn/emo/chowang/100.gif name="text" value="Kiểm tra"> 
   <input type="image" src=http://blog.uhm.vn/emo/chowang/34.gif name="text" value= "  Xóa "> 
   <font color="blue" size="30">
   <hr width =50%>
	<?php
	if(isset($_POST["a"]))
{  
   $a=$_POST["a"];
       
	   $t=is_numeric($a);
     if($a=="" or $t!=1 or $a<0)
	   {
		  echo "Error!";
		  return;
	   } 
     function kiemtrasnt($a) //HÀM
     {	 
       if ($a==2 or $a==3) {echo "$a là số nguyên tố";return;}		  
	   if(($a==0 or $a==1 ) or $a%3==0 or $a%2==0) { echo "$a không là số nguyên tố";return;}			     
          $m =(float)sqrt($a);
      for($i=5;$i<=$m;$i=$i+6)
             {if($a % $i == 0 || $a % ($i+2) == 0)

			 echo "$a không là số nguyên tố"; return;
			 }
			  echo "$a là số nguyên tố";return;
			  
	  }
	   kiemtrasnt($a);// GỌI HÀM
}
?>
    <br><br>
  <font size=5 color= pink ><marquee scrolldelay="60" scrollamount="4" direction="right" behavior="scroll" tilte="xin chào" onmouseout="this.start();" onmouseover="this.stop();">
   <a target="" title=""  >design by nhat linh</a>  </font> 
              </marquee>
</html>